package kosta.model.board.file;

import java.sql.SQLException;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

@Service
public class FileBoardServiceImpl implements FileBoardService {
	@Resource(name = "fileBoardDaoImpl")
	private FileBoardDao fileBoardDao;

	@Override
	public List<FileBoardVO> getListBoard() throws SQLException {
		return fileBoardDao.getListBoard();
	}

	@Override
	public FileBoardVO findByNo(int no) throws SQLException {
		return this.fileBoardDao.findByNo(no);
	}

	@Override
	public int insertBoard(FileBoardVO fvo) throws SQLException {
		return this.fileBoardDao.insertBoard(fvo);
	}

	@Override
	public void updateBoard(FileBoardVO bvo) throws SQLException {
		this.fileBoardDao.updateBoard(bvo);
	}

	@Override
	public void updateCount(FileBoardVO vo) throws SQLException {
		this.fileBoardDao.updateCount(vo);
	}

	@Override
	public List<FileBoardVO> findById(String id) throws SQLException {
		return null;
	}

	@Override
	public List<FileBoardVO> findByTitle(String title) throws SQLException {
		return null;
	}

	@Override
	public void erasureUploadFile(FileBoardVO vo) throws SQLException {
		this.fileBoardDao.deleteUploadFile(vo);
	}

	@Override
	public void erasureFileBoard(int fileNo) throws SQLException {
		this.fileBoardDao.deleteBoard(fileNo);
	}

	@Override
	public void pointPlus(String fileWriter) throws SQLException {
		this.fileBoardDao.pointPlus(fileWriter);
	}
}
